$(function(){
    $('#add').click(function(){
        self.location=baseurl+'admin/ads/add';
        return false;
    });
    
    $('#delm').click(function(){
        var idstr='';
        $('input:[checked=true]').each(
            function(){
                idstr+=$(this).val()+',';
            }
        );
        self.location = baseurl + "admin/ads/delm/"+idstr;
        return false;
    });
    
    $('#timeSearch').change(function(){
        var tt=$('#timeSearch').val();
        self.location = baseurl + "admin/ads/index/"+tt;
        return false;
    });
    
});